<%@ page language="java" import="com.alibaba.fastjson.JSONObject" pageEncoding="UTF-8" %>
<%@ page import="weaver.common.DateUtil" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="weaver.general.BaseBean" %>
<%@ page import="weaver.general.Util" %>
<%--获取流水号--%>
<%
    JSONObject jsonData = new JSONObject();
    RecordSet rs = new RecordSet();
    BaseBean baseBean = new BaseBean();
    String formtable = "formtable_main_286";//在线考试答题
    String requestid = Util.null2String(request.getParameter("requestid"));
    rs.executeQuery("select ksdjsj from "+formtable+" where requestid=?",requestid);
    rs.next();
    String ksdjsj = Util.null2String(rs.getString(1));
    baseBean.writeLog(">>>>getWriteTestKszt.jsp>>>requestid="+requestid+",ksdjsj="+ksdjsj);
    String sql="";
    boolean flag = false;
    if("".equals(ksdjsj)){
        String fullDate = DateUtil.getFullDate();
        sql = "update " + formtable + " set ksdjsj='"+fullDate+"',kszt=1 where requestid=?";
        baseBean.writeLog(">>>>getWriteTestKszt.jsp>>>sql="+sql);
        rs.executeUpdate(sql, requestid);
        sql = "update uf_kstjtz_dt1 set ksdjsj='"+fullDate+"',kszt=1 where sjxq=?";
        rs.executeUpdate(sql, requestid);
        flag = true;
        jsonData.put("ksdjsj",fullDate);
    }
    jsonData.put("flag",flag);
    out.print(jsonData.toJSONString());
%>
